<div id="actionbar" class="fn-clear">
    <div class="fn-left">
        <div class="tipbox tipbox-message mb5">
            <span class="fn-fb">友情提示:</span>优惠券必须是超级券才允许使用。
        </div>
    </div>
    <div class="fn-right">
        <form id="form" action="{:url('card/selectConpon')}" method="get">
            <input type="hidden" name="input" value="{$input}" />
            <input type="hidden" name="store_id" value="{$store_id}" />
            <input placeholder="请输入用户优惠券名称" class="input w200" type="text" name="keyword" value="{$keyword}" />
            <input type="submit" value="搜索" class="button button-blue" />
        </form>
    </div>
</div>
<table class="table table-border">
    <thead>
        <tr>
            <th class="w100 fn-tac">#</th>
            <th>优惠券</th>
            <th class="w60 fn-tar">购买价</th>
            <th class="w100 fn-tac">￥额度</th>
            <th class="w80 fn-tac">￥满用</th>
            <th class="w100 fn-tac">抵扣/折扣</th>
            <th class="w200 fn-tac">有效期</th>
        </tr>
    </thead>
    <tbody>
        {foreach $lists as $vo}
        <tr>
            <td class="fn-tac">
                <a href="javascript:;" class="button select" title="选择" data-id="{$vo.id}"><i class="iconfont icon-text_icon"></i>选择</a>
            </td>
            <td>
                <i class="iconfont icon-discount"></i><span class="selectID fn-cp fn-fb" url="{:url('coupon/review',['id'=>$vo.id])}">{$vo.name}</span><br />
                <span class="selectID fn-cp" url="{:url('store/review',['id'=>$vo.store.id])}"><i class="iconfont icon-store_icon"></i>{$vo.store.name}</span><br />
                <span class="gray"><i class="iconfont icon-wodedingdan2"></i>{$vo.tips}</span>
            </td>
            <td class="fn-tar">{$vo.pay_price}</td>
            <td class="fn-tar">{$vo.size}元</td>
            <td class="fn-tar">{$vo.howmuch}元</td>
            <td class="fn-tar">{if $vo.types}<span class="badge bg-blue">{$vo.discount}折</span>{else}<span class="badge bg-green">{$vo.price}元</span>{/if}</td>
            <td class="fn-tac">{$vo.starttime|date="Y-m-d"} 至 {$vo.endtime|date="Y-m-d"}</td>
        </tr>
        {/foreach}
    </tbody>
</table>
{$lists|raw}
<script type="text/javascript">
    Do('base','layer',function(){
        var index = parent.layer.getFrameIndex(window.name);
        $('.select').click(function(){
            parent.$("#iframe").contents().find("#{$input}").val($(this).attr('data-id'));  
            parent.layer.close(index); 
        });
    })
</script>